package com.santu.edu.supporter.biz.order.kd.pojo.po;

import java.io.Serializable;
import java.math.BigDecimal;

import com.santu.edu.supporter.biz.order.kd.pojo.dto.KdOrderDTO;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName edu_supporter_order_kuaidi
 */
@Data
@Accessors(chain = true)
public class KuaidiOrderPO implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 学校id
     */
    private String schoolId;

    /**
     * 订单号
     */
    private String orderId;

    /**
     * 用户id(发起人)
     */
    private String userId;

    /**
     * 快递点id
     */
    private String buildingsId;

    /**
     * 购买的商品信息
     */
    private String goodInfo;

    /**
     * 商品图片地址
     */
    private String imageUrl;

    /**
     * 商品类型[0:小件,1:中件,3:大件]
     */
    private Integer goodType;

    /**
     * 价钱
     */
    private BigDecimal price;


    /**
     * 备注信息
     */
    private String remarkInfo;

    /**
     * 送货地址id
     */
    private String addressId;

    /**
     * 订单状态[0:待认领1:进行中2:已完成]
     */
    private Integer orderType;

    /**
     * 货物状态
     */
    private Integer processType;

    /**
     * 送达照片
     */
    private String sendGoodImage;

    /**
     * 
     */
    private String gmtCreate;

    /**
     * 
     */
    private String gmtModified;

    private static final long serialVersionUID = 1L;

    public static KuaidiOrderPO createItem(KdOrderDTO dto) {
        return new KuaidiOrderPO()
                .setSchoolId(dto.getSchoolId())
                .setOrderId(dto.getOrderId())
                .setUserId(dto.getUserId())
                .setBuildingsId(dto.getBuildingsId())
                .setGoodInfo(dto.getGoodInfo())
                .setImageUrl(dto.getImageUrl())
                .setGoodType(dto.getGoodType().getCode())
                .setPrice(dto.getPrice())
                .setRemarkInfo(dto.getRemarkInfo())
                .setAddressId(dto.getAddressId())
                .setOrderType(dto.getOrderType().getCode())
                .setProcessType(dto.getProcessType().getCode())
                .setSendGoodImage(dto.getSendGoodImage());
    }

}